# Set the minimum version of CMake that can be used
# To find the cmake version run
# $ cmake --version
cmake_minimum_required(VERSION 3.26)

# 设置 C 编译器（如果不指定版本的话，使用的是 gcc 的默认版本）
#set (CMAKE_C_COMPILER /usr/bin/gcc)
# 设置 C++ 编译器 (指定的编译器为 g++9 )
#set (CMAKE_CXX_COMPILER /usr/bin/g++-9)

# Set the project name
project (hello)

set_property(GLOBAL PROPERTY HELLO_ROOT_DIR ${CMAKE_CURRENT_BINARY_DIR})
set_property(GLOBAL PROPERTY HELLO_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR})
get_property(ROOT_DIR GLOBAL PROPERTY HELLO_BUILD_DIR)


message("test============${ROOT_DIR}===================")

#if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options( -g -Wall  -fPIC  -shared   -Wextra -Wpedantic -std=c++17  -Wno-sign-compare)


include_directories(${CMAKE_CURRENT_SOURCE_DIR})
link_directories( /usr/local/lib )

set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../install)
#endif()


add_subdirectory(test)
add_subdirectory(system)
#add_subdirectory(benchmark-test)